package cn.pugle.ormtest.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;

import java.util.TimeZone;

/**
 * @author tzp
 * @date 2017/12/21
 */
public class JSON {
    public static final ObjectMapper SNAKE_MAPPER = new ObjectMapper();
    static {
            SNAKE_MAPPER.setTimeZone(TimeZone.getTimeZone("GMT+8:00"))
                    .setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
                    .setSerializationInclusion(JsonInclude.Include.ALWAYS);
    }
}
